<template>
    <p>this is home</p>
    <button @click="pushStr">vuex</button>
    <button @click="pushPath">vuex</button>
    <button @click="pushName">vuex</button>
    
</template>

<script setup>

import { useRouter } from "vue-router";

const router = useRouter()

const pushStr = ()=>{
    router.push('/vuex')
}
const pushPath = ()=>{
    router.push({path:'/vuex'})
}
const pushName = ()=>{
    router.push({name:'vuex'})
}

</script>